{extend name="Layout/datagrid" /}
{block name="content_header"}        
<h1>
    会员设置
    <small>advanced tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">会员</a></li>
    <li class="active">会员设置</li>
</ol>
{/block}
{block name="content"}
<div class="box">
    <div class="box-header">
        <ul class="nav nav-tabs">
            {foreach name="tabs" item="vo"}
            <li class="{$vo.active}"><a href="{:U($vo['url'])}">{$vo.title}</a></li>
            {/foreach}
        </ul>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="row">
            <div class="col-md-6">
                <!-- form start -->
                <form action="{:U('editSave')}" method="post" class="form-horizontal">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">注册奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="register" class="form-control input-sm" placeholder="注册奖励积分" value="{$data.register|default=30}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">登录奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="login" class="form-control input-sm" placeholder="登录奖励积分" value="{$data.login|default=2}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">每日登录积分上限</label>
                            <div class="col-sm-9">
                                <input type="text" name="login_max" class="form-control input-sm" placeholder="每日登录积分上限" value="{$data.login_max|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">每消费1元奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="expend" class="form-control input-sm" placeholder="每消费1元奖励积分" value="{$data.expend|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">积分购买商品价格</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <span class="input-group-addon">1元=</span>
                                    <input type="number" name="exchange_ratio" class="form-control input-sm" value="{$data.exchange_ratio|default=10}" placeholder="积分购买商品价格" required="required" />
                                    <span class="input-group-addon">积分</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">兑换商品上限</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <input type="number" name="exchange_max" class="form-control input-sm" value="{$data.exchange_max|default=50}" placeholder="兑换商品上限" required="required" />
                                    <span class="input-group-addon">%</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">每充值1元余额奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="recharge" class="form-control input-sm" placeholder="每充值1元余额奖励积分" value="{$data.recharge|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">手机认证奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="certify_mobile" class="form-control input-sm" placeholder="手机认证奖励积分" value="{$data.certify_mobile|default=0}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">邮箱认证奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="certify_email" class="form-control input-sm" placeholder="邮箱认证奖励积分" value="{$data.certify_email|default=0}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">实名认证奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="certify_realname" class="form-control input-sm" placeholder="实名认证奖励积分" value="{$data.certify_realname|default=0}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业认证奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="certify_company" class="form-control input-sm" placeholder="企业认证奖励积分" value="{$data.certify_company|default=0}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">发贴奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="topic" class="form-control input-sm" placeholder="发贴奖励积分" value="{$data.topic|default=5}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">回贴奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="reply" class="form-control input-sm" placeholder="回贴奖励积分" value="{$data.reply|default=3}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">删主题扣除积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="del_topic" class="form-control input-sm" placeholder="删主题扣除积分" value="{$data.del_topic|default=15}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">删回复扣除积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="del_reply" class="form-control input-sm" placeholder="删回复扣除积分" value="{$data.del_reply|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">提问问题扣除积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="question" class="form-control input-sm" placeholder="提问问题扣除积分" value="{$data.question|default=5}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">参与回答奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="answer" class="form-control input-sm" placeholder="参与回答奖励积分" value="{$data.answer|default=5}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">选为FAQ奖励积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="set_as_faq" class="form-control input-sm" placeholder="选为FAQ(最佳答案)奖励积分" value="{$data.set_as_faq|default=50}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">提问被删除扣除积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="del_question" class="form-control input-sm" placeholder="提问被删除扣除积分" value="{$data.del_question|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">回答被删除扣除积分</label>
                            <div class="col-sm-9">
                                <input type="text" name="del_answer" class="form-control input-sm" placeholder="回答被删除扣除积分" value="{$data.del_answer|default=10}" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">购买积分</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <span class="input-group-addon">1元=</span>
                                    <input type="number" name="money_to_integral_rate" class="form-control input-sm" value="{$data.expire_days|default=10}" placeholder="购买积分" required="required" />
                                    <span class="input-group-addon">积分</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">最小充值金额</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <input type="number" name="recharge_min_amount" class="form-control input-sm" value="{$data.recharge_min_amount|default=1}" placeholder="最小充值" required="required" />
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <button type="button" class="btn btn-default xsui-btn-close-dialog">取消</button>
                        <button type="submit" class="btn btn-primary pull-right">保存</button>
                    </div>
                    <!-- /.box-footer -->
                    <input type="hidden" name="id" value="{$data.id}"/>
                </form>
            </div>
        </div>
    </div>
    {/block}
    {block name="script_before"}
    <script>
        $('select[name="category_id"]').ajaxcombobox({first: {id: "", text: "选择货币"}});
    </script>
    {/block}